package com.bdqn.blog.service.impl;

import com.bdqn.blog.entity.Consumer;
import com.bdqn.blog.mapper.ConsumerMapper;
import com.bdqn.blog.service.ConsumerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端用户 服务实现类
 * </p>
 *
 * @author 阿桐幕
 * @since 2020-10-29
 */
@Service
public class ConsumerServiceImpl extends ServiceImpl<ConsumerMapper, Consumer> implements ConsumerService {

    @Resource
    ConsumerMapper consumerMapper;

    /**
     * 查询全部  可根据用户名模糊查询
     *
     * @param username
     */
    @Override
    public List<Consumer> findAllConsumerOrByName(String username) {
        return consumerMapper.findAllConsumerOrByName(username);
    }
}
